home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / WIN / VB_DB / PROFIT.ZIP / CNVMAIN.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1993-03-14  |  1.3 KB  |  48 lines

  1. VERSION 2.00
  2. Begin Form CnvMain 
  3.    Caption         =   "Convert Profit Chef 1.01 files to 1.02"
  4.    Height          =   1425
  5.    Left            =   1035
  6.    LinkTopic       =   "Form1"
  7.    ScaleHeight     =   1020
  8.    ScaleWidth      =   4485
  9.    Top             =   1140
  10.    Width           =   4605
  11.    Begin Label Label1 
  12.       Caption         =   "Label1"
  13.       Height          =   375
  14.       Left            =   600
  15.       TabIndex        =   0
  16.       Top             =   360
  17.       Width           =   2895
  18.    End
  19. Sub Form_Load ()
  20.   Show
  21.   '******** Initialize Btrieve ********************
  22.   init$ = "/m:38 /p:4096 /b:16 /u:2 /f:20 /l:20 /n:12 /t:c:\btrieve.trn"
  23.   St% = WBtrvInit(init$)
  24.   If St% <> 0 Then
  25.     Msg$ = "Btrieve not initialized.  Status = " + Str$(St%)
  26.     T1% = MsgBox(Msg$, 0, "Warning!")
  27.   Else
  28.     Label1.Caption = "Working ... please wait..."
  29.     ProcessRecords
  30.   End If
  31. End Sub
  32. Sub ProcessRecords ()
  33.   OpenIngredientFile
  34.   If IngredientSt% = 0 Then
  35.     FirstIngredient
  36.     While IngredientSt% = 0
  37.       IngredientRec.IngCaseCost = IngredientRec.IngCaseCost * 100
  38.       UpdateIngredient
  39.       NextIngredient
  40.       t% = DoEvents()
  41.     Wend
  42.     CloseIngredientFile
  43.   Else
  44.     MsgBox "Ingredient File not opened successfully."
  45.   End If
  46.   Unload CnvMain
  47. End Sub
  48.